package io.github.weiranyi.dao.impl;

import io.github.weiranyi.dao.UserDao;

import java.util.*;

public class UserDaoImpl implements UserDao {
    private List<Object> list;
    private Set<Object> set;
    private Object[] array; // 创建数组
    private Map<String, Object> map;
    private Properties properties;

    public void setList(List list) {
        this.list = list;
    }

    public void setSet(Set set) {
        this.set = set;
    }

    public void setArray(Object[] array) {
        this.array = array;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void init() {
        System.out.println("初始化方法执行了");
    }

    public void destroy() {
        System.out.println("销毁方法执行了");
    }

    @Override
    public void save() {
        System.out.println("list集合：" + list);
        System.out.println("set集合：" + set);
        System.out.println("数组" + Arrays.toString(array));
        System.out.println("map集合" + map);
        System.out.println("properties" + properties);

        System.out.println("保存了数据");
    }


}
